Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge vmimage pkg #24

Merged
merged 3 commits into from
Jul 3, 2024
Merged

merge vmimage pkg #24

merged 3 commits into from
Jul 3, 2024

Conversation

aajkl
Copy link
Contributor

@aajkl aajkl commented Jul 3, 2024

merge github.com/yuyang0/vmimage

@aajkl
Copy link
Contributor Author

aajkl commented Jul 3, 2024

@anrs @CMGS

return imgName
}

func GetMockManager() *mocks.Manager {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about putting a test file, or initializing from calling point

Copy link
Contributor Author

@aajkl aajkl Jul 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't find a good place to put these code, because if initializing at calling point, then we need provoide a function to set the global instance of factory pkg with the mocked object, I think it's ugly

err = fmt.Errorf("invalid image name: %s", fullname)
return
}
if user == "" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this if block seems can be removed?

user = ""
}
parts = strings.Split(nameTag, ":")
switch len(parts) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be simplified as switch parts = strings.Split(nameTag, ":"); len(parts) {

@anrs
Copy link
Contributor

anrs commented Jul 3, 2024

rest of them LGTM

@aajkl aajkl merged commit 068d4ad into projecteru2:master Jul 3, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants